﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfDemo.Common
{
    public class MenuApi
    {
        public async Task<List<ModuleGroup>> getGroup()
        {
            List<ModuleGroup> list = new List<ModuleGroup>();
            list.Add(new ModuleGroup
            {
                GroupName = "系统管理",
                Icon = "\ue691",
                ContractionTemplate = false,
                Modules = new System.Collections.ObjectModel.ObservableCollection<Modules>(getModule())
            });
            list.Add(new ModuleGroup
            {
                GroupName = "硬件管理",
                Icon = "\ue691",
                ContractionTemplate = false,
                Modules = new System.Collections.ObjectModel.ObservableCollection<Modules>(getModule2())
            });
            list.Add(new ModuleGroup
            {
                GroupName = "统计报表",
                ContractionTemplate = false,
                Icon = "\ue670"
            });
            return list;
        }
        public List<Modules> getModule()
        {
            List<Modules> list = new List<Modules>();
            list.Add(new Modules
            {
                Code = "\ue693",
                Name = "用户管理",
                TypeName = "Sys.User.Index"
            });
            list.Add(new Modules
            {
                Code = "\ue663",
                Name = "角色管理",
                TypeName = "Sys.Role.Index"
            });
            list.Add(new Modules
            {
                Code = "\ue695",
                Name = "菜单管理",
                TypeName = "Sys.Module.Index"
            });
            return list;
        }
        public List<Modules> getModule2()
        {
            List<Modules> list = new List<Modules>();
            list.Add(new Modules
            {
                Code = "\ue693",
                Name = "仪表管理",
                TypeName = "system.user.User"
            });
            list.Add(new Modules
            {
                Code = "\ue663",
                Name = "控制器管理",
                TypeName = "system.user.User"
            });
            list.Add(new Modules
            {
                Code = "\ue695",
                Name = "视频管理",
                TypeName = "system.user.User"
            });
            list.Add(new Modules
            {
                Code = "\ue695",
                Name = "车牌识别",
                TypeName = "system.user.User"
            });
            return list;
        }
    }
}
